package com.app.common.xss;

import jakarta.servlet.*;
import jakarta.servlet.http.HttpServletRequest;

import java.io.IOException;

/**
 * @author : [zhuhj]
 * @version : [v1.0.0]
 * @description : [描述说明该类的功能]
 * @createTime : 2025/8/19
 * @updateUser : [zhuhj]
 * @updateTime : 2025/8/19
 * @updateRemark : [描述说明本次修改内容]
 */
public class XssFilter implements Filter {

    @Override
    public void init(FilterConfig config) throws ServletException {
    }

    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper(
                (HttpServletRequest) request);
        chain.doFilter(xssRequest, response);
    }

    @Override
    public void destroy() {
    }

}
